package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-17
 * Time: 8:39
 */
public class BookList {
    private Book[] books = new Book[10];
    private int booksize = 0;

    public BookList () {
        books[0] = new Book("三国演义","罗贯中","小说",55.5);
        books[1] = new Book("红楼梦","曹雪芹","小说",64.1);
        books[2] = new Book("西游记","吴承恩","小说",44.5);
        booksize = 3;
    }


    public Book getBooks(int i) {
        return books[i];
    }

    public void setBooks(int pos,Book book) {
       books[pos] = book;
    }
    public int getBooksize() {
        return booksize;
    }

    public void setBooksize(int booksize) {
        this.booksize = booksize;
    }
}
